﻿using ERP.Workflow.Designer.Domain.Shared;
using Volo.Abp.Data;

namespace ERP.Workflow.Designer.Application.Contracts
{

    public class FlowNodeExtendValue
    {
        public bool Contenteditable { get; set; }
        public string? Name { get; set; }
        public string? Icon { get; set; }
        public int Rotate { get; set; }
        public string? Code { get; set; }
        public int? OrderNo { get; set; }
        public NodeType NodeType { get; set; } = NodeType.General;
        public SplitRule SplitRule { get; set; } = SplitRule.SplitOR;
        public JoinRule JoinRule { get; set; } = JoinRule.SplitXOR;
        public ReposeType ReposeType { get; set; } = ReposeType.Any;
        public EntyType EntyType { get; set; } = EntyType.Auto;
        public ExitType ExitType { get; set; } = ExitType.Manual;
        public string? ActorAssembly { get; set; }
        public string? CirculatedAssembly { get; set; }
        public bool IsCanChangeCirculated { get; set; } = false;
        public bool IsCanEditForm { get; set; } = false;
        public ModeType ModeType { get; set; } = ModeType.PC;
        public bool HasHistoryCanSkip { get; set; }
        public bool NotActorIsCanSkip { get; set; } = false;
        public string? NotActorDefault { get; set; }
        public bool IsCanTransfer { get; set; } = false;
        public bool IsCanCirculated { get; set; } = false;
        public bool IsCanComments { get; set; } = false;
        public bool IsCanRejected { get; set; } = false;
        public bool IsCanWithdraw { get; set; } = false;
        public bool IsCanChangeActor { get; set; } = false;
    }
    public class NodeDto : IHasExtraProperties
    {
        public Guid Id { get; set; }
        public string? Title { get; set; }
        public double X { get; set; }
        public double Y { get; set; }
        public double Width { get; set; }
        public double Height { get; set; }
        public List<PortDto> Ports { get; set; } = new List<PortDto>();
        // public List<LinkDto> Links { get; set; } = new List<LinkDto>();
        
        public Guid DefinitionId { get; set; }
        public ExtraPropertyDictionary? ExtraProperties { get; set; }=new ExtraPropertyDictionary();    

    }
}